import { network } from '@/utils';

import { logisCenter } from '../../../../../config/Apis';

export async function queryBatchList(params: any) {
  return network.get(logisCenter.batch_list, { params });
  // return network.get('/batch/list');
}

export async function batchImport(params: any) {
  return network.post(logisCenter.batch_importExcel, { body: params });
}

export async function printBatch(params: any) {
  return {
    code: 0,
    msg: '打印成功',
  };
}

export async function queryDetailInfo(params: { batchId: number}) {
   return network.get(logisCenter.batch_detail, { params });
}

export async function openBatch(params: any) {
  return network.put(logisCenter.batch_open, { data: params });
}

export async function closeBatch(params: any) {
  return network.put(logisCenter.batch_close, { data: params });
}
